

PCYACC version 2.0, release 2.18
ABRAXAS SOFTWARE INC., Mar 13, 1989

------------------------------------------------------------

I. Contents of the distribution disk(s) (for your convenience,
   some intermediate files are also included, though not
   listed here):


PROGRAM DISK::

directory \:

  pcyacc.exe   -- executable PCYACC

  read.me      -- this text file


directory   \src:

  errorlib.c   -- advanced error handling runtime library.

  yaccpar.c    -- Unix YACC compatible Parser skeleton ( use with -P option )


directory \sacalc:

  makefile   -- makefile for sacalc

  sacalc.y   -- simple calculator program


directory \intopost:

  makefile   -- makefile for intopost

  intopost.y -- a program that does infix to postfix conversions

  infixel    -- a sample file with infex notation

  postfix.txt -- the result of the conversion


directory \pic:

  makefile     -- makefile for pic

  defs.h       -- header file for pic
  parse.h      -- header file generated by PCYACC
  parse.y      -- frontend of the pic language processor
  main.c       -- drive routine
  scan.c       -- lexical analyzer
  draw.c       -- picture maker
  yysub.c      -- action routine

  t1.pic       -- a sample of pic program
  t2.pic       -- a second PIC example

directory \brief:
  extended.m   -- brief macros
   
EXAMPLES DISK::

directory \grammmar:

  yacc.y       -- grammar for pcyacc

  lex.y        -- grammar for pclex

  K&R_c.y      -- Kernighan & Ritchie C grammar

directory \pascal: ( ISO PASCAL support, syntax analyzer )

  pascal.y     -- pascal grammar
  LEX.C        -- PASCAL LEXICAL ANALYZER
               -- including all support code

directory \ANSIC: ( ANSI C, syntax analyzer )

  ANSIC.y     -- ANSI C grammar
              -- ANSI C LEXICAL ANALYZER
              -- including all support code


directory \Prolog: ( Clocksin & Mellish Prolog, syntax analyzer )

  PROLOG.Y     -- pascal grammar
               -- including all support code


directory \smltlk: ( SmallTalk - 80, syntax analyzer )

  st.y         -- smalltalk-80 grammar
               -- including all support code


directory \db3: ( db3 syntax analyzer )
  
  db3.y        -- dBASE III/Plus grammar

  lex.c        -- lexical analyzer

  main.c       -- drive code

               -- including all support code

directory \db4: ( db4 syntax analyzer )
  
  db3.y        -- dBASE IV grammar

  lex.c        -- lexical analyzer

  main.c       -- drive code

               -- including all support code


directory \sql: ( Structured Query syntax analyzer )

  SQL.Y        -- Structured Query Language Grammar

               -- including all support code


directory \hyptlk: ( HyperTalk syntax analyzer )


  HYPTLK.Y     -- Hypertalk Grammar

               -- including all support code


C PLUS PLUS DISK::


directory \cpp: ( Abraxas C Plus Plus Preprocessor )

  cpp.y        -- C++ grammar

  lex.c        -- C++ lexical analyzer

               -- including all support code


II. EXAMPLES


Each example comes with a MAKEFILE; so to make executable programs
out of the examples, just go to the appropriate directory and issue
the MAKE command (provided you have properly installed PCYACC and
have a make utility on your system). If you do not have a make
utility, you can figure out from the makefiles the dependencies
among source modules and carry out the compilation and linking
processes manually.


a). SACALC  : a simple arithmetic calculator

b). INTOPOST: a program for translating arithmetic expression from
              their infix notation to their postfix notation
c). PIC     : a simple graphics language processor


( ** PROFESSIONAL ONLY )

d). CPP       : Abraxas C Plus Plus ( C++ ) Preprocessor

e). DB3       : dBase III/Plus syntax analyzer.

f). PASCAL    : Pascal syntax analyzer

g). SQL       : Structured Query Language, Syntax Analyzer

h). SmlTalk   : SmallTalk, Syntax Analyzer

i). PostScript: Adobe Postscript Engine

j). Hypertalk : Apple hypertalk Engine

K). ANSI C    : ANSIC syntax analyzer

L). DB4       : DBASE IV syntax analyzer


III. Important information


1). Command line switches, as described below:
    
    ( pcyacc command line is case sensitive )

    a). command line format:
  
        PCYACC [-C<cf>|-c] [-D[<df>]|-d] [-S] [-V[<vf>]|-v] <srcfile>

        e.g. this command line "pcyacc sacalc.y" would cause the grammar file
        "sacalc.y" to be processed by PCYACC and the resulting C parser
        would be generated in file "sacalc.c"

    b). option -c:

        use default name "yytab.c" for parser file
    
    c). option -C<cf>:

        use <cf> for parser file

    d). option -d:

        generate a header file in "yytab.h"

    e). option -D[<df>]:

        generate a header file in <df>;
        if no <df> is given, use input file name plus ".h"

    f). option -S: ( all other switches implicitly deactivated )

        quick syntax check on input file;

    g). option -t:

        build the parser in such a way that it produces, in "srcfil.ast",
        a parse tree for the source program being processed, at runtime of
        target application.

    h). option -T[<tf>]:

        build the parser in such a way that it produces, in <tf>,
        a parse tree for the source program being processed;
        if no <tf> is given, use input file name plus ".ast";

    i). option -v:

        generate a textual LALR parsing table of the parser
        being built in "yy.lrt"

    j). option -V[<vf>]:

        generate a textual LALR parsing table of the parser
        being built in <vf>; if no <vf> is given, use
        input file name plus ".lrt"

    k). option -P[<pf>]:

        use external skeleton parse file where <f> is the file
        name. Default is internal parser for use with -T option.

l). option -s:

        PCYACC parser tables generate "short" instead of "int" arrays.

        ( this is useful for porting software to environments where int
        and short are different ).

2.) Temporary file will use path pointed to by the "TMP" or "TEMP"
        environmental paths, so that pcyacc can use your ram disk or such.
        The default is current directory for tmp file.

3.) PCYACC can be executed within the Brief and Microsoft programmers
        editors thereby allowing "pseudo" syntax directed editing 
        be sure to use -S "quick syntax" option for quick turnaround.

4.) For unix/yacc compatibility use external skeletal parser \SRC\YACCPAR.C
        with -P switch. PCYACC is compatible with YACCPAR from UNIX(ATT)/YACC
        for those needing exact unix compatibility.

5.) The AST function generates a file "grm.ast" at runtime of the target
        application when PCYACC compiles with the -t switch.

6.) During development of large and slow to compile grammars like C++
        use the -S ( quick syntax ) features to find your syntax errors
        while your in your editor. ( we support BRIEF ).

7.) If during very large compiles you get the error out of heap space with
        Microsoft C 5.0+, use the -B1 option to run c1l.exe ( large model )
        compiler. i.e. ( cl /B1 <path>\c1l.exe <sourcefile>.c )

8.) It appears Microsoft C 5.1 ( 4.0 had no problems ) has a limitation of 64K 
        within any expression, so while there may be support for many case 
        statements you may run out of expression heap; keep your inline code 
        at a minimum, if your working with large grammars using microsoft C.
        Lattice C appears to have no limitations using HUGE model.


IV. PCLEX

        Many of our customers from UNIX have requested LEX support.

        Our preference is to write lexical analyzers by scratch as seen
        by our examples, however if you must use LEX please mention
        on you registration form that you want PCLEX and we'll send it
        to you ASAP.

